package xyz.lwm.lazycat.web.annocation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * <h2>表单对象</h2>
 * <p>将 http 表单请求转为对象参数</p>
 *
 * <h4>Example 1</h4>
 * <p>
 * Simple form bean, properties default to form parameters matching the property name.
 * </p>
 *
 * <pre>{@code
 *   public class MyForm {
 *
 *     public String id;
 *     public String name;
 *   }
 *
 *   ...
 *
 *   @Post
 *   void postForm(@Form MyForm fooForm) {
 *
 *     ...
 *   }
 *
 * }</pre>
 *
 * <h4>Example 2</h4>
 * <p>
 * Form bean with various annotations.
 * </p>
 *
 * <pre>{@code
 *   public class MyForm {
 *
 *     @Param("start-date")
 *     public LocalDate startDate;
 *
 *     @Default("Fred")
 *     public String myName;
 *
 *     @Cookie
 *     public String lastActive;
 *   }
 *
 * }</pre>
 */
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface Form {

}
